package main

import (
	"fmt"
	"net"
	"time"
)

func main12() {
	conn, err := net.Dial("tcp", ":8888")
	if err != nil {
		fmt.Println("客户端创建连接失败：", err.Error())
		return
	}
	time.Sleep(3 * time.Second)
	conn.Write([]byte("hello"))
	fmt.Println(currentTime(), "客户端发送消息hello")
	conn.Close()
	fmt.Println(currentTime(), "客户端已关闭")
	time.Sleep(60 * time.Second)
}
